from app import create_app
from flask_sqlalchemy import SQLAlchemy
from models.account import User, db

if __name__ == '__main__':
    app = create_app()
    app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///./hello.db"
    db.app = app
    db.init_app(app=app)
    db.create_all()
    admin = User(username='admin', email='admin@example.com')
    db.session.add(admin)
    db.session.commit()
    app.run()